package com.fancon.book.landautienthanmat;

import android.content.Context;
import android.content.SharedPreferences;

public class PreferenceUtil {
	public static final String PREFS_NAME = "CHAPTER_PREF";
	public static final String PREFS_KEY = "CHAPTER";
	public static void setChapter(Context ctx, String key, String val){
		SharedPreferences pref = ctx.getSharedPreferences(PREFS_NAME, 0);
		SharedPreferences.Editor edit = pref.edit();
		edit.putString(key, val);
		edit.commit();
	}
	public static String getChapter(Context ctx, String key, String delVal){
		SharedPreferences pref = ctx.getSharedPreferences(PREFS_NAME, 0);
		return pref.getString(key, delVal);
	}
}
